package com.xiaoshuidi.cloud.module.report.dal.DO;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.xiaoshuidi.cloud.framework.tenant.core.db.TenantBaseDO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;

/**
 * <p>
 * 设备用量明细表
 * </p>
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("tb_device_dosage")
@Schema(description="设备用量明细表")
public class DeviceDosageDO extends TenantBaseDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "主键id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "设备编号")
    private String deviceNo;

    @Schema(description = "抄表日期")
    private LocalDate dosageDate;

    @Schema(description = "初始数量")
    private Double startAmount;

    @Schema(description = "最后数量")
    private Double endAmount;

    @Schema(description = "记录数据状态 1正常 0无效'")
    private Integer status;

    @Schema(description = "上次抄表日期")
    private LocalDate startDosageDate;

    @Schema(description = "本次计算金额 本次读数 - 上次读数 * 单价(阶梯计算)")
    private BigDecimal amount;




}
